package com.qf.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.Random;

/*
 *@Description:
 *@author:刘哥
 *@Date:86180 2022/8/30 20:34
 */
@RestController
@RequestMapping("test")
public class TestController {
    @RequestMapping("test01")
    public String test01(){
        if (new Random().nextBoolean()) {
            int i = 1 / 0;
        }
        return "test1success";
    }
    @RequestMapping("test02")
    public String test02(){
        if (new Random().nextBoolean()) {
            String s = null;
            s.toString();
        }
        return "test2success";
    }
    @RequestMapping("/test03")
    public String test03() {
        if (new Random().nextBoolean()) {
            ArrayList<Object> list = new ArrayList<>();
            list.get(10);
        }
        return "test3success";
    }
}
